﻿#region <!-- Using Directives -->

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Windows.Forms;
using System.Windows.Threading;
using System.Xml;
using Office = Microsoft.Office.Core;
using Word = Microsoft.Office.Interop.Word;

#endregion

namespace WordSharpDev
{
	partial class WordSharpPane : UserControl
	{
		#region <!-- Switch Status -->

		public void SwitchStatusReady()
		{
			ActionPane.SwitchStatusReady();
		}

		public void SwitchStatusWait()
		{
			ActionPane.SwitchStatusWait();
		}

		public void SwitchStatusError()
		{
			ActionPane.SwitchStatusError();
		}

		#endregion

		#region <!-- Document Section -->

		public void ShowDocumentTab()
		{
			ActionPane.ShowDocumentTab();
		}

		public void ReloadDocumentCount()
		{
			ActionPane.ReloadDocumentCount();
		}

		public void ReloadDocumentBase()
		{
			ActionPane.ReloadDocumentBase();
		}

		public void NotifyDocumentSelected(XmlNode p_Document)
		{
			ActionPane.NotifyDocumentSelected(p_Document);
		}

		public void NotifyDocumentMerged(XmlNode p_Document)
		{
			ActionPane.NotifyDocumentMerged(p_Document);
		}

		public event Action OnDocPropChange
		{
			add { ActionPane.OnDocPropChange += value; }
			remove { ActionPane.OnDocPropChange -= value; }
		}

		public String DocumentProperties
		{
			get { return ActionPane.DocumentProperties; }
			set { ActionPane.DocumentProperties = value; }
		}

		public Boolean IsDocumentSaved
		{
			set { ActionPane.IsDocumentSaved = value; }
		}

		#endregion

		#region <!-- Code Section -->

		public void ShowCodeTab()
		{
			ActionPane.ShowCodeTab();
		}

		public event Action OnCodeDescChange
		{
			add { ActionPane.OnCodeDescChange += value; }
			remove { ActionPane.OnCodeDescChange -= value; }
		}

		public String CodeDescription
		{
			get { return ActionPane.CodeDescription; }
			set { ActionPane.CodeDescription = value; }
		}

		public Word.Table CodeTarget
		{
			get { return ActionPane.CodeTarget; }
			set { ActionPane.CodeTarget = value; }
		}

		#endregion

		#region <!-- Logs Section -->

		public void ShowDetailLogsTab()
		{
			ActionPane.ShowDetailLogsTab();
		}

		public void WriteMainLogs(String p_Logs)
		{
			ActionPane.WriteMainLogs(p_Logs);
		}

		public void WriteDetailLogs(String p_Logs)
		{
			ActionPane.WriteDetailLogs(p_Logs);
		}

		#endregion

		public WordSharpPane()
		{
			InitializeComponent();
		}
	}
}